package StudyCode.summary.mycollection;

import java.util.ArrayList;
import java.util.Arrays;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class ConvertArrayListToStringArray {
	public static void main(String args[]) {
		ArrayList<String> aListDays = new ArrayList<String>();
		aListDays.add("Sunday");
		aListDays.add("Monday");
		aListDays.add("Tuesday");
		Object[] objDays = aListDays.toArray();

		String[] strDays = Arrays.copyOf(objDays, objDays.length, String[].class);

		System.out.println("ArrayList 转换为字符串(String)数组:");

		for (int i = 0; i < strDays.length; i++) {
			System.out.println(strDays[i]);
		}
	}
}
